package com.digdes.calendar.gwt.client.service;

import com.digdes.calendar.gwt.client.dto.EventDTOImpl;
import com.digdes.calendar.gwt.client.dto.PlaceDTOImpl;
import com.digdes.calendar.gwt.client.dto.UserDTOImpl;
import com.google.gwt.user.client.rpc.RemoteService;
import com.google.gwt.user.client.rpc.RemoteServiceRelativePath;

import java.util.ArrayList;
import java.util.Date;
import java.util.Set;

@RemoteServiceRelativePath("CalendarService")
public interface CalendarService extends RemoteService {
    // Sample interface method of remote interface
    ArrayList<EventDTOImpl> getEvents(String d);

    public ArrayList<EventDTOImpl> getEventsBetween(String dStart, String dFinish);

    public ArrayList<EventDTOImpl> getOldEvents(String d);

    public void deleteEvent(Long id);

    public Set<EventDTOImpl> getEventByPlaceAndDate(Long id, Date start, Date finish);

    public Set<EventDTOImpl> getEventByUserAndDate(Long id, Date start, Date finish);

    public EventDTOImpl saveEvent(EventDTOImpl eventDTO);

    public Set<UserDTOImpl> getUsers();

    public Set<PlaceDTOImpl> getAllPlace();

    public Long addUser(UserDTOImpl userDTO);
    public String addPlace(PlaceDTOImpl placeDTO);
}